
<?php $form=$this->beginWidget('bootstrap.widgets.BootActiveForm',array(
	'id'=>'entry-form',
	'htmlOptions'=>array('class'=>'well'),
	'enableAjaxValidation'=>false,
));

$parents = $model->getRecommendedParents();

$ref = array();
$entries = array();
$parentsData = CMap::mergeArray(array(
		array(
		(empty($modelParent))? "" : $modelParent->id =>(empty($modelParent))? 'Gốc' : $modelParent->name)),
		CHtml::listData($parents, 'id', 'name'
	)
);
?>
	<?php echo $form->dropDownListRow($model,'parent_id', $parentsData, array('class'=>'span8')); ?>

	<p class="help-block">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<?php echo $form->textFieldRow($model,'name',array('class'=>'span8')); ?>

	<?php echo $form->textFieldRow($model,'name_en',array('class'=>'span8')); ?>

	<?php echo $form->dropDownListRow($model,'is_leaf',array("1"=>"Yes", "0"=>"No")); ?>

		<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.BootButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
	</div>


<?php $this->endWidget(); ?>

